<template>
	<view class="container">
		<swiper :indicator-dots="true" :autoplay="true" :interval="3000" :duration="1000">
			<swiper-item v-for="item,index in list">
				<view class="swiper-item"><image :src="'../../static'+item.icon" mode="" style="width: 100%; height: 240px;"></image></view>
			</swiper-item>
		</swiper>
		
		<uni-section title="留言列表" type="line" padding>
					<!-- 因为swiper特性的关系，请指定swiper的高度 ，swiper的高度并不会被内容撑开-->
					<swiper class="swiper" :indicator-dots="true">
						<swiper-item>
							<uni-grid :column="3" :highlight="true" @change="change">
								<uni-grid-item v-for="(item, index) in list" :index="index" :key="index">
									<view class="grid-item-box">
										<image :src="item.url" class="image" mode="aspectFill" />
										<text class="text">{{ item.text }}</text>
									</view>
								</uni-grid-item>
							</uni-grid>
						</swiper-item>
						<swiper-item>
							<uni-grid :column="3" :highlight="true" @change="change">
								<uni-grid-item v-for="(item, index) in list" :index="index" :key="index">
									<view class="grid-item-box">
										<image :src="item.url" class="image" mode="aspectFill" />
										<text class="text">{{ item.text }}</text>
									</view>
								</uni-grid-item>
							</uni-grid>
						</swiper-item>
						<swiper-item>
							<uni-grid :column="3" :highlight="true" @change="change">
								<uni-grid-item v-for="(item, index) in list" :index="index" :key="index">
									<view class="grid-item-box">
										<image :src="item.url" class="image" mode="aspectFill" />
										<text class="text">{{ item.text }}</text>
									</view>
								</uni-grid-item>
							</uni-grid>
						</swiper-item>
						
					</swiper>
				</uni-section>
	</view>
</template>

<script>
		export default {
			data() {
				return {
					"list": [{
							"id": 1,
							"icon": "../../static/1.png",
						},
						{
							"id": 2,
							"icon": "/images/2.png",
						},
					]
				}
			},
			methods: {
	 
			},
			onLoad: () => {
				uni.onTabBarMidButtonTap(function(e){
					console.log(e)
					
				})
			}
		}
	</script>

<style>
	.container {
		/* padding: 20px; */ /*删除内边距*/
		font-size: 14px;
		line-height: 24px;
	}
</style>
